﻿using System;
using System.Runtime.Serialization;

namespace NCMIS.ObjectModel.MetaData
{
    /// <summary>
    /// Represents a hierarchy of object-types, with a base type and its children types.
    /// </summary>
    [DataContract(Namespace = CmisNs.Cmism)]
    public class TypeContainer
    {
        /// <summary>
        /// The base type of the hierarchy.
        /// </summary>
        [DataMember(Name = "type")]
        public TypeDefinition @Type
        {
            get;
            set;
        }

        /// <summary>
        /// The child types of the hierarchy.
        /// </summary>
        [DataMember(Name = "children")]
        public TypeContainer[] Children
        {
            get;
            set;
        }
    }
}
